import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('HitTestBehavior.opaque'),
        ),
        body: GestureDetector(
          onHorizontalDragStart: (_) {
            print('Listener: Pointer Down');
          },
          child: Container(
            height: 800,
            color: Colors.red,
            child: Center(
              child: GestureDetector(
                onTap: () {
                  print('GestureDetector: Tap');
                },
                behavior: HitTestBehavior.deferToChild,
                child: Container(
                  width: 400,
                  height: 400,
                  color: Colors.blue,
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}